myApp.factory("viewService",function($http, $q) {
   
    return {
        getUsers : getUsers
    };
   
    function getUsers(){
        var deferred = $q.defer();
        var token = new Date().getMilliseconds();
        return $http({
            method : 'GET',
            url    : 'test?token=' + token
        }).success(function(respData) {
            deferred.resolve(respData);			
        }).error(function(errorData) {
            console.log("Error while retriving users. Error: " + errorData.ex );
        //commonService.showErrorMessage(errorData ,"Error while receiving project details.");
        });
        return deferred.promise;
    };
});